'use strict';
const dxClient = require("./dx/index");
const tencentClient = require("./tencent/index");

exports.main = async (event, context) => {
  console.log("captcha-power===============",process.version)
  let {CLIENTIP: ip_info} = context
  console.log("ip_info==", ip_info)
  if (event.action) {
    switch (event.action) {
      case "dxVerify":
        //后台逻辑流程
        return dxClient.verifyDxToken(event.token)
        break
      case "tencentVerify":
        return tencentClient.verifyTencentToken(event.ticket, ip_info)
        break
    }
  }
  return "没有后台相关逻辑"
};
